package com.redbudcloud.distributenetwork.entity.user;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by zhxiaotong on 17-12-17.
 */
@Entity
@Table(name = "t_user",schema = "public")
public class User {
    private Long userId;
    private String userName;
    private String loginName;
    private String password;
    private String token;
    private Timestamp insDate;
    private Timestamp updDate;
    private Long userStatus;

    public User(){}

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "user_id",unique = true,nullable = false,length = 32)
    public Long getUserId(){return userId;}
    public void setUserId(Long userId) {this.userId = userId;}

    @Column(name = "user_name",nullable = false,length = 32)
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Column(name = "login_name",nullable = false,length = 32)
    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    @Column(name = "password",nullable = true,length = 32)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "token",nullable = true,length = 32)
    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Column(name = "ins_Date",nullable = false,length = 6)
    public Timestamp getInsDate() {
        return insDate;
    }

    public void setInsDate(Timestamp insDate) {
        this.insDate = insDate;
    }

    @Column(name = "upd_date",nullable = false,length = 6)
    public Timestamp getUpdDate() {
        return updDate;
    }

    public void setUpdDate(Timestamp updDate) {
        this.updDate = updDate;
    }

    @Column(name = "user_status",nullable = false,length = 32)
    public Long getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Long userStatus) {
        this.userStatus = userStatus;
    }
}
